package com.hg.design.creation.builder.biancheng;

import org.apache.commons.lang3.StringUtils;

public class Product {
    private String partA;
    private String partB;
    private String partC;
    public void setPartA(String partA) {
        this.partA = partA;
    }
    public void setPartB(String partB) {
        this.partB = partB;
    }
    public void setPartC(String partC) {
        this.partC = partC;
    }
    public void show() {
        //显示产品的特性
        System.out.println("本产品拥有: ");
        if (StringUtils.isNotBlank(partA)) {
            System.out.println("A部分");
        }
        if (StringUtils.isNotBlank(partB)) {
            System.out.println("B部分");
        }
        if (StringUtils.isNotBlank(partC)) {
            System.out.println("C部分");
        }
    }
}
